<?php
/*******************************************************************************
 *
 *  Name: getdaterangeforview
 *
 *  Date: 2012-04-25
 *  
 *  Description: This is the view that takes a range to find the incidents in 
 *               that range
 *  
 *  Author: 
 *  
 *  Todo:
 *     NONE
 *
 *  Modification History:  
 * 
 *   Date         Name
 *  ----------   --------------
 *  2012-04-25   HAYDEN WAISANEN
 *  2012-04-22   HAYDEN WAISANEN
 * 
 *****************************************************************************/
?>

<script>
$(document).ready(function () {
   $('input').each(function () { 
      $(this).keyup( function (event) { 
         if(event.keyCode != 8)
         {
            if($(this).val().length == 2 || $(this).val().length == 5)
               $(this).val($(this).val()+'-')
         }
      });
      $(this).click( function (event) { 
         if($(this).val() == 'MM-DD-YYYY')
            $(this).val('');
      });
   });
});
</script>
<?php echo validation_errors(); ?>

<?php echo form_open('analyst/viewincidents/irteam'); ?>

<h5>Select Range</h5>
<div>
Start Date:<input type="text" name="start" value="
<?php 
if(set_value('start') == '')
   echo "MM-DD-YYYY";
else 
   echo set_value('start');
 ?>" size="10" />
End Date:<input type="text" name="end" value="
<?php 
if(set_value('end') == '')
   echo "MM-DD-YYYY";
else 
   echo set_value('start');
?>" size="10" />


<!-- IR TEAMs -->
<select name="irteam">
<option value='All'>All</option>
<?php
foreach ($irteams AS $team)
{
   echo "<option value='".$team["UserID"]."'>".$team["UserID"]."</option>";
}
?>
</select>

<input type="submit" value="Submit" />
</div>

</form>
